<#include "../common/constant.ftl" />
<title>搭配师审核列表</title>
<form class="form-horizontal" role="form" id="validation-form" method="POST" action="${ctx}/admin/collocation/auditList${suffix}" onsubmit="return fromSearch(this)">
	手机号:<input type="input" name="name" value="${pager.searchMap.title!''}" id="title"/>
	<button class="btn btn-minier btn-success" type="submit"><i class="fa fa-search"></i>搜  索</button>
</form>
<div class="hr hr-5"></div>
<div class="row">
	<div class="col-xs-12">
		<div class="table-responsive">
			<table id="sample-table-1" class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						<th class="center" width="5%">编号</th>
						<th class="center" width="10%">手机号</th>
						<th class="center" width="10%">真实姓名</th>
						<th class="center" width="10%">昵称</th>
						<th class="center" width="10%">微信号</th>
						<th class="center" width="10%">审核状态</th>
						<th class="center" width="20%">最后登录时间</th>
						<th class="center">操作</th>
					</tr>
					
				</thead>
				<tbody>
				<#list pager.itemList as c>
					<tr>
						<td class="center">${c_index+1}</td>
						<td class="center">${c.contact!""}</td>
						<td class="center">${c.collocationInformation.realName!""}</td>
						<td class="center">${c.nickName!""}</td>
					    <td class="center">${commonSexOptions[c.collocationInformation.sex+''!"1"]}</td>
						<td class="center">${auditStatusOptions[c.auditState+''!"1"]}</td>
						<td class="center">${tagUtils.formatDate(c.lastLoginTime!"0")}</td>
						<td class="center">
						<button class="btn btn-primary" onclick="javascript:window.location.href='${ctx}/admin/collocation/${c.id!}/detail'">
 						<i class="icon-beaker align-top"></i>审核</button>
						</td>
					</tr>
					</#list>
				</tbody>
			</table>
		</div><!-- /.table-responsive -->
		
		<div class="hr hr-18 dotted hr-double"></div>
		<@h.page pager=pager action="${ctx}/admin/auditList/list${suffix}" />
	</div><!-- /span -->
</div><!-- /row -->

<script>

function doCollocationState(checkbox, uid) {
	var str ;
	if(checkbox.checked == true){
		str ="启用";
		checkbox.checked = false;
	}else{
		str = "禁用";
		checkbox.checked = true;
	}
 	if(confirm("确定要"+str+"该用户吗？")){
 		var href = ctx + "/admin/collocation/" + uid +"/checkState";
		window.location.href = href;
 	}

}

function fromSearch(f){
	if(f.informationTypeId.value) {
		f.pager.value += "$$informationTypeId--" + f.informationTypeId.value;
	}
	if(f.title.value){
		f.pager.value += "$$title--" + f.title.value;
	}
	location.href = f.action + "?pager=" + f.pager.value;
	return false;
}

</script>
